﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ZengBiao.aspx.cs" Inherits="Web.Pages.QuShui.DiXiaS.YongHuGL.HuJiGL.ZengBiao" Theme="Default"%>
<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script src="../../../../../JS/jquery.js"></script>
    <script src="../../../../../JS/AddEditCancel.js" type="text/javascript"></script>
    <style type="text/css">
        td {
         white-space:nowrap;
        }
    </style>
    <script type="text/javascript">
        function OnSearch(s) {
            btnChaXun.OnClick();
            //hdCollection.Set("yhh", s.GetText());
            //ASPxCallback1.PerformCallback("setinfo");
        }

        function ASPxCallback1Complete(rs) {
            var arr = rs.split('|');
            var type = arr[0];
            var state = arr[1];
            if (type == "setinfo") {
                txtYONGHUM.SetText(arr[2]);
                txtJingBH.SetText(arr[3]);
                txtYJingBH.SetText(arr[4]);
                txtQuShuiDD.SetText(arr[5]);
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div class="tabletitle1" align="center">
            增表
        </div>
          <dx:ASPxHiddenField ID="hdCollection" ClientInstanceName="hdCollection" runat="server"></dx:ASPxHiddenField>
        <dx:ASPxCallback ID="ASPxCallback1" ClientInstanceName="ASPxCallback1" runat="server" OnCallback="ASPxCallback1_Callback" ClientSideEvents-CallbackComplete="function(s,e){ASPxCallback1Complete(e.result);}"></dx:ASPxCallback>
          
        <asp:UpdatePanel runat="server" ID="updatePanel1">
            <ContentTemplate>
                <div style="border: 0px solid #4486a9; width: 99%;">
                    <div style="width: 80%; margin: auto;">
                        <fieldset style="border: 1px solid  #d0e4fe;">
                            <asp:Panel ID="panEdit" runat="server">
                                <legend style="font-weight: bold"></legend>
                                <table border="0" style="margin: auto; width: 100%">
                                    <tr>
                                        <td style="text-align: right;">用户号：
                                        </td>
                                        <td >
                                            <dx:ASPxTextBox ID="txtYongHuH" ClientInstanceName="txtYongHuH" runat="server" Width="60%"  ClientEnabled="false">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtShuiBiaoBH);var key = event.keyCode;if( key==13){OnSearch(s);}}" />
                                            </dx:ASPxTextBox>
                                        </td>
                                         <td>
                                            <dx:ASPxButton ID="btnChaXun" runat="server" Text="查询" ClientInstanceName="btnChaXun" OnClick="btnChaXun_Click">
                                               <%--<ClientSideEvents Click />--%>
                                            </dx:ASPxButton>
                                        </td> 
                                          <td colspan="2" style="float:right;">
                                             <dx:ASPxButton ID="btnSFYC" ClientInstanceName="btnSFYC" runat="server" Text="是否远传"  UseSubmitBehavior="false" ></dx:ASPxButton> 
                                        </td> 
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">用户名：
                                        </td>
                                        <td colspan="3">
                                            <dx:ASPxTextBox ID="txtYONGHUM" ClientInstanceName="txtYONGHUM" runat="server" Width="80%" ClientEnabled="false">
                                            </dx:ASPxTextBox>
                                        </td>
                                        
                                    </tr>
                                    <tr>
                                        <td style="text-align: right;"><span id="Span1" runat="server"></span>
                                        </td>
                                        <td>
                                            
                                             <dx:ASPxComboBox ID="txtJingBH" ClientInstanceName="txtJingBH" runat="server"  Width="60%" ClientEnabled="true" OnSelectedIndexChanged="txtJingBH_SelectedIndexChanged" AutoPostBack="true" >
                                            <ClientSideEvents />
                                             </dx:ASPxComboBox> 
                                            
                                        </td>
                                      <td style="text-align: right;"><span id="Span2" runat="server"></span>
                                        </td>
                                        <td>
                                            <dx:ASPxTextBox ID="txtYJingBH" ClientInstanceName="txtYJingBH" runat="server" Width="60%" ClientEnabled="false">
                                            </dx:ASPxTextBox> 
                                        </td> 
                                    </tr>
                                     <tr>
                                        <td style="text-align: right">取水地点：
                                        </td>
                                        <td colspan="3">
                                            <dx:ASPxTextBox ID="txtQuShuiDD" ClientInstanceName="txtQuShuiDD" runat="server" Width="80%" ClientEnabled="false">
                                            </dx:ASPxTextBox>
                                        </td>
                                    </tr> 
                                     <tr>
                                        <td style="text-align: right;">水表编号：
                                        </td>
                                        <td>
                                            <dx:ASPxTextBox ID="txtShuiBiaoBH" ClientInstanceName="txtShuiBiaoBH" runat="server" Width="60%">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtBiaoHao);}" />
                                            </dx:ASPxTextBox> 
                                        </td>
                                   
                                    </tr>  
                                   
                                     <tr>
                                        <td style="text-align: right;">表号：
                                        </td>
                                        <td>
                                            <dx:ASPxTextBox ID="txtBiaoHao" ClientInstanceName="txtBiaoHao" runat="server" Width="60%" >
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(txtBiaoJing);}" />
                                            </dx:ASPxTextBox> 
                                        </td>
                                        <td style="text-align: right">表径：
                                        </td>
                                        <td>
                                            <dx:ASPxTextBox ID="txtBiaoJing" ClientInstanceName="txtBiaoJing" runat="server" Width="60%" >
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(cmbCengHao);}" />
                                            </dx:ASPxTextBox>
                                        </td>
                                    </tr> 
                                    
                                    <tr>
                                        <td style="text-align: right">册号：
                                        </td>
                                        <td>
                                            <dx:ASPxComboBox ID="cmbCengHao" ClientInstanceName="cmbCengHao" runat="server"  Width="60%">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(cmbShuiLiangLB);}" />
                                            </dx:ASPxComboBox>
                                        </td>
                                          <td style="text-align: right">水量类别：
                                        </td>
                                        <td>
                                            <dx:ASPxComboBox ID="cmbShuiLiangLB" ClientInstanceName="cmbShuiLiangLB" runat="server" ValueType="System.String" Width="60%">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(cmbBiaoFenL);}" />
                                            </dx:ASPxComboBox>
                                        </td> 
                                    </tr>
                                    <tr>
                                        <td style="text-align: right">表分类：
                                        </td>
                                        <td>
                                            <dx:ASPxComboBox ID="cmbBiaoFenL" ClientInstanceName="cmbBiaoFenL" runat="server" ValueType="System.String" Width="60%">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(cmbBiaoBiaoJ);}" />
                                            </dx:ASPxComboBox>
                                        </td>
                                          <td style="text-align: right">表标记：
                                        </td>
                                        <td>
                                            <dx:ASPxComboBox ID="cmbBiaoBiaoJ" ClientInstanceName="cmbBiaoBiaoJ" runat="server" ClientEnabled="false"  Width="60%">
                                                <Items>
                                                    <dx:ListEditItem Text="空" Value="0" Selected="true"/>
                                                </Items>
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(BeiZhu);}" />
                                            </dx:ASPxComboBox>
                                        </td> 
                                    </tr>
                                     <tr>
                                        <td style="text-align: right">总表号：
                                        </td>
                                        <td>
                                            <dx:ASPxTextBox ID="txtZongBiaoH" ClientInstanceName="txtZongBiaoH" runat="server" Width="60%" ClientEnabled="false">
                                            </dx:ASPxTextBox>
                                        </td>
                                         <td style="text-align: right">增加到表号：
                                        </td>
                                         <td>
                                             <table>
                                                 <tr>
                                                     <td>
                                                         <dx:ASPxTextBox ID="txtBiaoH2" ClientInstanceName="txtBiaoH2" runat="server" Width="100%">
                                                         </dx:ASPxTextBox>
                                                     </td>
                                                     <td>之后</td>
                                                 </tr>
                                             </table>
                                         </td>
                                    </tr> 
                                    <tr>
                                        <td style="text-align: right">备注：
                                        </td>
                                        <td colspan="3">
                                             <dx:ASPxMemo ID="BeiZhu" ClientInstanceName="BeiZhu" runat="server" Width="80%">
                                                <ClientSideEvents KeyPress="function(s,e){OnKeyNext(btnSave);}" />
                                            </dx:ASPxMemo> 
                                        </td>
                                    </tr>
                                </table>
                            </asp:Panel>
                        </fieldset>
                    </div>
                    <div style="text-align: right">
                        <hr />

                        <dx:ASPxButton ID="btnEdit" ClientInstanceName="btnEdit" runat="server" Text="增表" OnClick="btnEdit_Click" UseSubmitBehavior="false" Visible="true">
                        </dx:ASPxButton>
                        <dx:ASPxButton ID="btnSave" ClientInstanceName="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" UseSubmitBehavior="false" Visible="false">
                            <ClientSideEvents Click="function(s, e) {
	                                               if (ASPxClientEdit.ValidateGroup('group')) {                 
                                                                   e.processOnServer = true;             
                                                                } 
                                                                else 
                                                                { 
                                                                   e.processOnServer = false; 
                                                                }
                                                    }" />
                        </dx:ASPxButton>
                        <dx:ASPxButton ID="btnCancel" ClientInstanceName="btnCancel" runat="server" Text="放弃" OnClick="btnCancel_Click" UseSubmitBehavior="false" Visible="false">
                        </dx:ASPxButton>

                    </div>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel> 
    </form>
</body>
</html>
